<!DOCTYPE html>
<html>

<head>
    <metacharset="UTF-8">
        <title>v-if指令</title>
</head>

<body>
    <div id="app">
        <h1 v-show="display">Display</h1>
        <h1 v-show="hide">Hide</h1>
        <h1 v-show="age >= 25">Age: {{ age }}</h1>
        <h1 v-show="name.indexOf('Tom')>=0">Name:{{name}}</h1>
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.0.2/vue.global.prod.js"></script>
    <script>
        const vm = Vue.createApp({
            data() {
                return {
                    display: true,
                    hide: false,
                    age: 28,
                    name: 'Tom Cruise'
                }
            }
        }).mount('#app');
    </script>
</body>

</html>